public class Demo02 {
    public static void main(String[] args) {
        dianshiji d = new dianshiji();
        jisuanji j = new jisuanji();
        panding p = new panding();
        chazuo c = new dianshiji();
        p.pd(d);
        p.pd(j);
        p.pd(c);
    }
}
class chazuo{
    public void tongdian(){
        System.out.println("通电");
    }

}
class dianshiji extends chazuo{
    public void tongdian(){
        System.out.println("电视通电");
    }
}

class jisuanji extends chazuo{
    public void tongdian(){
        System.out.println("计算机通电");
    }
}
class panding{
    public void pd(chazuo c){
        c.tongdian();
    }
}